﻿package com.moonshineproject.text.change 
{
	
	public class TextChangeRemove extends TextChangeBase
	{
		private var _endLine:int;
		private var _endChar:int;
		private var _textLines:Vector.<String>;
		
		public function get endLine():int	{ return _endLine; }
		public function get endChar():int	{ return _endChar; }
		public function get textLines():Vector.<String>	{ return _textLines; }
		
		public function TextChangeRemove(startLine:int, startChar:int, endLine:int, endChar:int)
		{
			super(TextChangeBase.UNBLOCK);
			
			_startLine = startLine;
			_startChar = startChar;
			_endLine = endLine;
			_endChar = endChar;
		}
		
		public override function getReverse():TextChangeBase
		{
			if (textLines)
			{
				return new TextChangeInsert(startLine, startChar, textLines);
			}
			
			return null;
		}
		
		public function setTextLines(textLines:Vector.<String>):void
		{
			_textLines = textLines;
		}
		
	}

}